package com.ticket.sass.admin.controller;


import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.ticket.sass.admin.business.TenantBusiness;
import com.ticket.sass.admin.dto.input.tenants.TransactionInput;
import com.ticket.sass.admin.dto.output.tenants.TransactionDataOutput;
import com.ticket.sass.admin.model.ResultModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ywb
 * @since 2024-03-18
 */
@RestController
@AllArgsConstructor
@ApiSupport(order = 99)
@Api(tags = {"总店-租户数据"})
@RequestMapping("/tenants")
public class TenantController {
    final TenantBusiness tenantBusiness;
    
    @GetMapping("/info")
    @ApiOperation(value = "账目明细")
    public ResultModel<TransactionDataOutput> info(
        @Valid TransactionInput input
        ){
        return ResultModel.success(
            tenantBusiness.info(input)
        );
    }
}
